import { get, post, dele } from "../utils/request";

// 添加购物车
export const addToCart = (product, num = 1) =>
  post("/api/v1/shop_carts", {
    product,
    quantity: num,
  });

//   获取购物车列表

export const loadCartlist = () => get("/api/v1/shop_carts");


// 删除购物车
export const delpro = (id) => dele("/api/v1/shop_carts/" + id)

// 全选删除
// export const delcart = (params) => post("/api/v1/orders/delmany", params)